package com.czl.module_storehouse.bean;

import com.czl.module_base.bean.CompanyBean;

import java.util.UUID;

public class AddSupplierBean {

    /**
     * 联系人电话
     */
    private String contactPhone;
    /**
     * 联系人
     */
    private String contactName;
    /**
     * 公司详细地址
     */
    private String companyAddress = "";
    /**
     * 省
     */
    private String companyProvince = "";
    /**
     * 市
     */
    private String companyCity = "";
    /**
     * 区县
     */
    private String companyDistrict = "";
    /**
     * 公司名称
     */
    private String companyName;
    /**
     * 简称
     */
    private String companyShortName;
    /**
     * 组织机构代码(唯一性KEY)
     */
    private String organizationCode;
    private String crmCompanyId;
    private int managerCompanyId;
    private String companyId;
    private int opUserId;
    private String userId;
    private int contactUserId;

    private String legalPerson;
    private int companyTag;
    private int crmType;
    private boolean isEditable;

    public boolean isEditable() {
        return isEditable;
    }

    public void setEditable(boolean editable) {
        isEditable = editable;
    }

    public void setCompanyBean(CompanyBean companyBean, int manageCompanyId, String userId) {
        companyProvince = companyBean.getCompanyProvince();
        companyCity = companyBean.getCompanyCity();
        companyDistrict = companyBean.getCompanyDistrict();
        companyId = companyBean.getCompanyId();
        this.managerCompanyId = manageCompanyId;
        opUserId = companyBean.getOpUserId();
        this.userId = userId;
        contactUserId = companyBean.getContactUserId();
        organizationCode = companyBean.getOrganizationCode();
    }

    public int getCompanyTag() {
        return companyTag;
    }

    public void setCompanyTag(int companyTag) {
        this.companyTag = companyTag;
        this.crmType = companyTag;
    }

    public AddSupplierBean() {
        organizationCode = UUID.randomUUID().toString();
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public String getContactName() {
        return contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
        this.legalPerson = contactName;
    }

    public String getLegalPerson() {
        return legalPerson;
    }

    public void setLegalPerson(String legalPerson) {
        this.legalPerson = legalPerson;
    }

    public String getCompanyAddress() {
        return companyAddress;
    }

    public void setCompanyAddress(String companyAddress) {
        this.companyAddress = companyAddress;
    }

    public String getCompanyProvince() {
        return companyProvince;
    }

    public void setCompanyProvince(String companyProvince) {
        this.companyProvince = companyProvince;
    }

    public String getCompanyCity() {
        return companyCity;
    }

    public void setCompanyCity(String companyCity) {
        this.companyCity = companyCity;
    }

    public String getCompanyDistrict() {
        return companyDistrict;
    }

    public void setCompanyDistrict(String companyDistrict) {
        this.companyDistrict = companyDistrict;
    }

    public String getCompanyName() {
        return companyName;
    }

    public String getCompanyShortName() {
        return companyShortName;
    }

    public void setCompanyShortName(String companyShortName) {
        this.companyShortName = companyShortName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
        this.companyShortName = companyName;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }
}
